/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package DAO;


import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.logging.Level;
import java.util.logging.Logger;



/**
 *
 * @author Ariel
 */
public class databaseConection {
    private Connection con;
    
public databaseConection(){
 String connectionUrl = "jdbc:sqlserver:\\SQLEXPRESS;databaseName=Condovac;user=condo;password=Anteojos1";
        try {
            
            Class.forName ("com.microsoft.sqlserver.jdbc.SQLServerDriver");
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(databaseConection.class.getName()).log(Level.SEVERE, null, ex);
       con=null;
       return;
        }

        try {
             con = DriverManager.getConnection(connectionUrl);
        } catch (SQLException ex) {
            con=null;
            Logger.getLogger(databaseConection.class.getName()).log(Level.SEVERE, null, ex);
        }

}


 public Connection getConection(){
 return con;
 
 
 }
    
    
    
    
    
}
